<?php
defined('_JEXEC') or die;
$info=$this->data->information;
$id=JRequest::getInt("user_id",0);
?>
<style type="text/css">
	.w115{width: 115px}
	.ml30{margin-left: 30px}
</style>
<div class="wrapper">
	<div class="content" id="dietaryHabits-page">
		<div class="col-wrapper clearfix">
			<div class="info">
				<ul class="breadcrumb2">
					<li><a>Mine Brugere</a></li>
					<li><a>Konto</a></li>
					<li><a><?php echo $this->data->name?> - <?php echo str_pad( $this->data->id,5 , 0, STR_PAD_LEFT)?></a></li>
				</ul>
				<div class="clear"></div>
				<ul class="breadcrumb mb20">
					<li><a href="index.php?option=com_users&view=profile&layout=student&user_id=<?php echo $id?>">Personlige oplysninger</a></li>
					<li class="active"><a>Kostvaner/ ønsker</a></li>
					<li><a href="index.php?option=com_users&view=profile&layout=student3&user_id=<?php echo $id?>">Motionsvaner/ ønsker</a></li>
					<li><a href="index.php?option=com_users&view=profile&layout=student5&user_id=<?php echo $id?>">Dit abonnement</a></li>
				</ul>
<form>
					<h1 class="hd">Kostvaner/ ønsker</h1>
					<div class="colum bor mr27 fl m-h">
						<div class="col-wra">
							<div>Nuværende spisevaner:</div>
							<div>
								<label>Spiser du morgenmad regelmæssigt?</label>
							</div>

	<div class="fr">
		<label class="uper"><?php echo ($info['breakfast']) ? '<b style="color:#0B0">Ja</b>/Nej' : 'Ja/<b style="color:red">Nej</b>'?></label>
	</div>
<?php if($info['breakfast']){?>
	<div id="opt1">
		<label class="fl ita w150">Hvis ja, hvad spiser du?</label>
		<div style="width:86px"><?php echo $info['breakfast']?></div>
	</div>
<?php }?>
						</div>
						<div class="col-wra">
							<div>
								<label>Drikker du sodavand?</label>
							</div>

	<div class="fr">
		<label class="uper"><?php echo ($info['soda']) ? '<b style="color:#0B0">Ja</b>/Nej' : 'Ja/<b style="color:red">Nej</b>'?></label>
	</div>
<?php if($info['soda']){?>
	<div id="opt2">
		<label class="fl ita w150">Hvis ja, hvor meget ca. pr. dag?</label>
		<div style="width:86px"><?php echo $info['soda']?></div>
	</div>
<?php }?>
						</div>
						<div class="col-wra">
							<div>
								<label>Mener du, at du spiser nogenlunde <br> sundt</label>
							</div>

	<div class="fr">
		<label class="uper"><?php echo ($info['eatwell']) ? '<b style="color:#0B0">Ja</b>/Nej' : 'Ja/<b style="color:red">Nej</b>'?></label>
	</div>
<?php if($info['eatwell']){?>
	<div id="opt3">
		<label class="fl ita" style="width: 182px">Hvor stor en procentdel af det du indtager, mener du er sundt?</label>
		<div style="width:22px;margin-left: 28px"><?php echo $info['eatwell']?>&nbsp;%</div>
	</div>
<?php }?>
						</div>
						<div class="col-wra">
							<div>
								<label style="width:208px">Har du nogen form for spiseforstyrrelser</label>
							</div>

	<div class="fr">
		<label class="uper"><?php echo ($info['roiloan']) ? '<b style="color:#0B0">Ja</b>/Nej' : 'Ja/<b style="color:red">Nej</b>'?></label>
	</div>
	<div class="clear"></div>
<?php if($info['roiloan']){?>
	<div id="opt4" class="fr">
		<div>
			<label>Hvis ja, har du fået eller får du hjælp?</label>
		</div>
		<div>
			<label class="uper"><?php echo ($info['roiloan']==1) ? '<b style="color:#0B0">Ja</b>/Nej' : 'Ja/<b style="color:red">Nej</b>'?></label>
		</div>
	</div>
<?php }?>
						</div>
					</div>
<?php
$tmp=explode('-',$info['meal1']);
?>
					<div class="colum bor mr27 fl m-h">
						<div class="col-wra">
							<div>Mulige kostvaner:</div>
							<div>Hvornår på dagen har du mulighed for at spise</div>
							<div class="mb0">
								<div class="fl w100 mt25">Måltid 1:</div>
								<div class="fl">
									<label>Fra kl.</label>
									<select class="w76">
										<option><?php echo str_pad($tmp[0],2,"0",STR_PAD_LEFT)?></option>
									</select>
								</div>
								<div class="fl ml7">
									<label>Til kl.</label>
									<select class="w76">
										<option><?php echo str_pad($tmp[1],2,"0",STR_PAD_LEFT)?></option>
									</select>
								</div>
							</div>
<?php
$tmp=explode('-',$info['meal2']);
?>
							<div class="mb0">
								<div class="fl w100 mt8">Måltid 2:</div>
								<div class="fl">
									<select class="w76">
										<option><?php echo str_pad($tmp[0],2,"0",STR_PAD_LEFT)?></option>
									</select>
								</div>
								<div class="fl ml7">
									<select class="w76">
										<option><?php echo str_pad($tmp[1],2,"0",STR_PAD_LEFT)?></option>
									</select>
								</div>
							</div>
<?php
$tmp=explode('-',$info['meal3']);
?>
							<div class="mb0">
								<div class="fl w100 mt8">Måltid 3:</div>
								<div class="fl">
									<select class="w76">
										<option><?php echo ($tmp[0]) ? str_pad($tmp[0],2,"0",STR_PAD_LEFT) : 'Nej'?></option>
									</select>
								</div>
								<div class="fl ml7">
									<select class="w76">
										<option><?php echo ($tmp[1]) ? str_pad($tmp[1],2,"0",STR_PAD_LEFT) : 'Nej'?></option>
									</select>
								</div>
							</div>
<?php
$tmp=explode('-',$info['meal4']);
?>
							<div class="mb0">
								<div class="fl w100 mt8">Måltid 4:</div>
								<div class="fl">
									<select class="w76">
										<option><?php echo ($tmp[0]) ? str_pad($tmp[0],2,"0",STR_PAD_LEFT) : 'Nej'?></option>
									</select>
								</div>
								<div class="fl ml7">
									<select class="w76">
										<option><?php echo ($tmp[1]) ? str_pad($tmp[1],2,"0",STR_PAD_LEFT) : 'Nej'?></option>
									</select>
								</div>
							</div>
<?php
$tmp=explode('-',$info['meal5']);
?>
							<div class="mb0">
								<div class="fl w100 mt8">Måltid 5:</div>
								<div class="fl">
									<select class="w76">
										<option><?php echo ($tmp[0]) ? str_pad($tmp[0],2,"0",STR_PAD_LEFT) : 'Nej'?></option>
									</select>
								</div>
								<div class="fl ml7">
									<select class="w76">
										<option><?php echo ($tmp[1]) ? str_pad($tmp[1],2,"0",STR_PAD_LEFT) : 'Nej'?></option>
									</select>
								</div>
							</div>
						</div>

						<div class="col-wra">
							<p class="mt5">Er det vigtigt, at den kost du indtager, er varierende og smagsfuld?</p>
							<div>
								<span style="color:red">
<?php
$tmp=intval($info['diversity']);
								echo $tmp==-1 ? 'Ikke vigtigt' : ($tmp==1 ? 'Meget vigtigt' : 'Ingen af delene')?>
								</span>
							</div>
						</div>
					</div>

					<div class="colum bor fr m-h">
						<div>Mulige kostvaner:</div>
						<div>Hvor meget tid vil du ca. bruge<br>på at lave mad pr. dag?</div>
						<div class="fr">
							<select class="w76" style="margin-left: 10px">
								<option><?php echo $info['cooktime'] ? : 'Nej'?></option>
							</select>
						</div>
						<div class="mt8">Hvilket fødevare(r) kan du lide?</div>
						<div class="clear"></div>
<?php
$tmp=explode('-',$info['fav']);
$tmp[0]=explode(',',$tmp[0]);$tmp[1]=explode(',',$tmp[1],count($tmp[0]));
$tmp=array_combine($tmp[0],$tmp[1]);
$i=0;
					foreach($tmp as $v):
?>
						<div class="w115 fl<?php if($i) echo " ml30"?>">
							<label class="w73 fl" style="color: red"><?php echo $v?></label>
						</div>
<?php				$i=1-$i;endforeach;?>
						<div>Er du allergisk overfor nogle<br>fødevarer?</div>

	<div class="fr">
		<label class="uper"><?php echo ($info['allergy']) ? '<b style="color:#0B0">Ja</b>/Nej' : 'Ja/<b style="color:red">Nej</b>'?></label>
	</div>
<?php if($info['allergy']){?>
	<div id="opt5">
		<label class="fl ita w100">Hvis ja, hvad?</label>
		<div style="width:86px"><?php echo $info['allergy']?></div>
	</div>
<?php }?>
					</div>

					<div class="clear"></div>
					<a class="fl bntPrevious" href="index.php?option=com_users&view=profile&layout=student&user_id=<?php echo $id?>">Forrige</a>
					<a class="fr bntNext" href="index.php?option=com_users&view=profile&layout=student3&user_id=<?php echo $id?>">Næste</a>
</form>
			</div>
		</div>
	</div>
</div>